home *** CD-ROM | disk | FTP | other *** search
-
- Cracking for Newbies #2 - by woody^drn
-
- Lets talk about how to approach a program with different kind of
- protections.
-
-
- How to defeat nags:
- -------------------
-
- There are several ways to defeat nag screens, and several different
- kinda nags.
-
- **Window with a button:
-
- Try to break on messageboxa. If it breaks, press F12 .. now the nag will
- appear press the ok button or what ever button there is, and sice will
- break again. Check if you're in the right file .. if not press F12 until
- you are.
-
- When you're in the right file, there should be a call right over the
- line you're at now. Scroll back .. do you see a je/jne ? yer ? reverse
- it or jump it. Didn't see a je/jne .. Press F12 .. scroll back, now
- do you see it ? if not do this until you do, and patch the je/jne.
- Does it work now ? if not .. read on.
-
- If messageboxa didn't work try getdlgitemtexta or getwindowtexta,
- and do the same thing.
-
- **Window without a button (works with both!):
-
- None of them worked! Okay, then we try another approach. Run the program
- and wait until the nag appears. It's there ? good .. break into sice and
- type hnwd, and you should see the windows handles, something like this:
-
- 0080(0) 2057 32 MSGSRV32 #32769 (desktop) 179F:00005622
- 05D0(1) 52AF 32 IEXPLORE Auto-Suggest Drop 140F:00000FC6
-
- and so on ... press enter until you see your program. If your program
- was calc.exe it would look something like this:
-
- 0314(1) 3D27 32 CALC SciCalc 484F:00000786
-
- The 0314 is the window handle, and that's what we're gonna break on.
- A window/window call does some checks, it checks when the mouse moves,
- and if the window is on focus and many other things. But what we need
- to know is what the command is when the window closes. and that's
- WM_DESTROY. Okay .. to break on the window handle we use the command
- bmsg (breakpoint on window message) type 'bmsg 0314 WM_DESTROY', if you
- just typed 'bmsg 0314' it will break every time you move the mouse on
- the window, and every time it's on focus .. and all the other commands/
- checks it does. But with wm_destroy it only breaks when it's going to
- close the window. Now press F12 until you're at the right file, and
- scroll back to check for je/jne's ..
-
- **Splash Screens:
-
- This kinda nag could window without any buttons, just some naggy texts.
- The first thing you do is to write the top and caption text down.
- Could look like this:
-
- +-------------------+
- |▓Please▒Register▒!░|
- +-------------------+
- | Register this nag |
- | only $200 |
- +-------------------+
-
- Now open your favorite hex editor and search for the text, found it ?
- Scroll back and find these bytes FF FF FF 80 ... replace 80 with 90, and
- the nag should go away :) if not debug it.
-
-
- How to defeat removed features:
- -------------------------------
-
- Programmers are usually lazy ;) me included ;) .. they often make
- a function that say "This feature is for registered only!" or something
- like that. So many times we only have to patch one place.
-
- **With w32dasm:
-
- It's quicker to use w32dasm first if you're an newbie, so boot up
- w32dasm and start searching for the text. If you found it, scroll back
- and look for je/jne's. Many times the protection is easy like:
-
- call <address>
- test eax,eax
- je <address>
-
- It calls the registration engine, and returns eax 1 or 0.
- Then it texts eax to see if it's 0, if not say "This feature ..."
-
- Now you could step into the call and make it return 0 in eax no matter
- what, or you could just reverse the je to jne or nop it.
-
- In Pascal this would be:
-
- begin
- check_if_registered;
- if registered=true then do_feature else display_nag;
- end.
-
- This kinda protection is normal! and is *very* easy to crack.
-
- **With sice:
-
- But you could also use sice for this, just make it break on the window
- commands (getwindowtexta, messageboxa, getdlgitemtexta and so on), and
- when it breaks press F11 to get the caller and check for je/jne's.
-
-
- How to defeat serials:
- ----------------------
-
- This is kinda hard to write about, cause the variation between methods
- how to make serials is very big. But there *is* some erhm "same" ways
- that the bad serial is compared to the right one.
-
- **Memory echo:
-
- Be suspicious when you see this kinda code:
-
- mov bl,[esi]
- mov bh,[edi]
- cmp bl,bh
- jne ...
-
- First it moves one byte from the good serial to esi, then it moves
- on byte from the "bad" (?) serial to edi, and compares those two.
- If they aren't the same the serial is wrong.
-
- So what you got to do is type 'd esi' and the correct serial should be
- there. Another code that does the same thing:
-
- mov ecx,length_of_valid_serial
- repz cmpsw
- je ...
-
- Moves ecx to how many bytes to compare, compares string at ds:esi (the
- correct serial) with es:edi (our serial). Just type 'd esi' and the
- correct serial should be there.
-
- Another code that moves serials:
-
- push ecx
- shr ecx,2
- repz movsd
- pop ecx
- and ecx,3
- repz movsv
- xor dx
- xor ax
-
- Here it saves ecx, find the number of words to copy, and copies them to
- es:di. Gets ecx again and copies it to es:di.
-
- When you're done with repz movsd type 'd ds:si' you should see the
- serial and name or whatever you typed. Now type 'd es:edi' and it will
- show you the location where your information will be copied to ..
- ie 1243:00000000. Now type 'page 1243:00000000' and something like this
- will show up.
-
- 04D23000 C73B3000 P A U RW System
-
- Now you need to know how many bytes the serial is, or you can guess!
- Look in the help file in the program, maybe he says something about it.
-
- type 'bpr 30:04d23000 30:04d2300A RW'
-
- This is for 10 bytes pwd, 04d23000+10 (10 = 0Ah) = 04d2300A.
- All ways use the selector 30, that's just the way it is !
-
- Now F5 and make sice break again .. and F5 .. and sice will break when
- it reads the serial. smart huh ?
-
- Guess that's it for today ... wanna say thnx to +orc and josephco for
- some of this info.
-
- -wOODY^dRN
-
-